package Lee_code;

import java.util.HashSet;
import java.util.stream.Collectors;

/**
 * @author blh
 * @date 2024年08月01日 18:02
 */
public class Lee_316_81 {
    public String removeDuplicateLetters(String s) {
        int len = s.length();
        HashSet<Character> hashSet = new HashSet<>();
        for (char c : s.toCharArray()) {
            hashSet.add(c);
        }
        StringBuilder sb = new StringBuilder();
        for (Character c : hashSet) {
            sb.append(c);
        }
        return sb.toString();
    }
}
